package com.bw.apps.net

import com.bw.apps.net.entity.AppEntity
import com.bw.common.mvi.BaseRespository
import com.bw.network.BaseEntity
import com.bw.network.HttpType
import com.bw.network.NetWorkFactory
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.map

class NetAppsRepo : BaseRespository() {

    //分页查询app
    fun requestApps(map : Map<String,Any>):Flow<BaseEntity>{
        val flow = NetWorkFactory.factory(HttpType.NONE).create(ApiService::class.java)
            .requestApps(createBody(map))
        return flow.map { value: AppEntity -> value }
    }

}